<template>
  <div>
    <div id="slider" class="mui-slider">
      <div
        id="sliderSegmentedControl"
        class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"
      >
        <div class="mui-scroll">
          <a
            class="mui-control-item mui-active"
            href="#item1mobile"
            data-wid="tab-top-subpage-1.html"
          >
            推荐
          </a>
          <a
            class="mui-control-item"
            href="#item2mobile"
            data-wid="tab-top-subpage-2.html"
          >
            热点
          </a>
          <a
            class="mui-control-item"
            href="#item3mobile"
            data-wid="tab-top-subpage-3.html"
          >
            北京
          </a>
          <a
            class="mui-control-item"
            href="#item4mobile"
            data-wid="tab-top-subpage-4.html"
          >
            社会
          </a>
          <a
            class="mui-control-item"
            href="#item5mobile"
            data-wid="tab-top-subpage-5.html"
          >
            娱乐
          </a>
		  <a
            class="mui-control-item"
            href="#item5mobile"
            data-wid="tab-top-subpage-5.html"
          >
            游戏
          </a>
		  <a
            class="mui-control-item"
            href="#item5mobile"
            data-wid="tab-top-subpage-5.html"
          >
            电脑
          </a>
        </div>
      </div>
    </div>
    <ul class="photo_list">
      <router-link v-for="item in list" :key="item.id" :to="'/home/photoinfo/' + item.id" tag="li">
        <img v-lazy="item.url" />
		<div class="info">
			<h1 class="info-title">{{ item.title }}</h1>
			<div class="info-body">{{ item.zhaiyao }}</div>
		</div>
      </router-link>
    </ul>
  </div>
</template>

<script>
import mui from "../../lib/mui/js/mui.min.js";

export default {
  data() {
    return {
	  list: [{id:'1',title:'我是中国人，我爱我的祖国和人民',zhaiyao:'由于这种常见的误解，当 ISO-8859-1 被声明时，浏览器将更改为 Windows-1252。这对以下文档类型都适用：HTML4、HTML5 和 XHTML。', url:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fa1.att.hudong.com%2F62%2F02%2F01300542526392139955025309984.jpg&refer=http%3A%2F%2Fa1.att.hudong.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1615893283&t=22a3efa30623189bf03696f8d0c42cd3'},
			 {id:'2',title:'我是中国人，我爱我的祖国和人民',zhaiyao:'由于这种常见的误解，当 ISO-8859-1 被声明时，浏览器将更改为 Windows-1252。这对以下文档类型都适用：HTML4、HTML5 和 XHTML。', url:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fa2.att.hudong.com%2F27%2F81%2F01200000194677136358818023076.jpg&refer=http%3A%2F%2Fa2.att.hudong.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1615893285&t=82dd0c5c2b0378935f8142daed41b44c'},
			 {id:'3',title:'我是中国人，我爱我的祖国和人民',zhaiyao:'由于这种常见的误解，当 ISO-8859-1 被声明时，浏览器将更改为 Windows-1252。这对以下文档类型都适用：HTML4、HTML5 和 XHTML。', url:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fa0.att.hudong.com%2F52%2F62%2F31300542679117141195629117826.jpg&refer=http%3A%2F%2Fa0.att.hudong.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1615893285&t=90b628a6c688bc5bbb35d986243fe243'}
	  ]
    };
  },
  mounted() {
    mui(".mui-scroll-wrapper").scroll({
      deceleration: 0.0005, //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
    });
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
* {
  touch-action: pan-y;
}

.photo_list {
  list-style: none;
  margin: 0;
  padding: 10px;
  padding-bottom: 0;
  li {
	background-color: #ccc;
	text-align: center;
	margin-bottom: 10px;
	box-shadow: 0 0 9px #999;
	position: relative;
	img{
		width: 100%;
		vertical-align: middle;
		background-color: red;
	}
    img[lazy="loading"] {
      width: 40px;
      height: 300px;
      margin: auto;
    }

	.info{
		color: #fff;
		text-align: left;
		position: absolute;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.4);
		max-height: 84px;
		.info-title{
			font-size: 14px;

		}
		.info-body{
           font-size: 13px;
		}
	}
  }
}
</style>